1. Field of the Invention
The present invention relates to a broadcasting signal processing apparatus and a method for recording to and reproducing from a hard disc drive (HDD). More particularly, the present invention relates to a broadcasting signal processing apparatus, and method of operating the same, capable of recording/reproducing on the HDD which can prevent loss of recorded data due to an abnormal termination when a broadcast signal is received and stored at the HDD of a personal video recorder (PVR).
2. Description of the Related Art
Recently, as storage capacities of hard disc drives (HDD) have improved, and the prices have decreased, many electronic appliances employ a HDD therein, to store or process large amounts of data and increase the capabilities of the electronic appliances. For example, at least one or more PVR set-top boxes have been developed that have a HDD and a PVR function capable of recording a broadcasting signal on a real time basis.
FIG. 1 is a flow chart illustrating the conventional operation of recording a broadcast signal at the PVR set-top box. Referring to FIG. 1, an external broadcast signal is received in step S10. When a user's command to record the received broadcast signal recording is received (step S20), the received broadcast signal is recorded in a data region of the HDD. Accordingly, the file allocation table (FAT) information is updated.
HDDs are partitioned upon installation or at the time of manufacture. When the HDD is partitioned, sectors, which are the smallest unit of space of the HDD that can be accessed, are assigned or grouped into clusters. Thus, a cluster is a group of sectors. Since each sector comprises 512 bytes, a cluster is some integer multiple of 512 bytes. The FAT keeps track of each cluster, what file is stored in each (there are generally more than one cluster per file) cluster, and which clusters are open, or have no files stored in them. In step S30, the received broadcast signal is stored in the HDD, and the FAT is updated as to which cluster or clusters the data has been stored in.
Following step S30, in the conventional method, it is determined, in decision step S40, whether an abnormal termination of the recording of the broadcast signal has occurred. If there was no abnormal termination of the recording of the broadcast signal (“No” path from decision step S40), the method then determines whether there is a user's command terminating recording of the received broadcast signal in decision step S50. If there is a user's command for terminating recording of the received broadcast signal (“Yes” path from decision step S50), recording on the data region in the HDD is terminated, and a data indicating the end of recording in the cluster (“cluster end data”) (such as FFFF hex) is recorded in the FAT for the corresponding cluster. The recording of the “cluster end data” takes place in the FAT at the position that corresponds to the last cluster where data for the received broadcast signal was recorded (step S60). If a user wishes to reproduce or search for the recorded file later, it is possible only if the “cluster end data” has been properly recorded in the FAT.
If an abnormal termination of the recording of the received broadcast signal occurs as a result of power loss, for example, the “cluster end data” is not recorded in the FAT and recording is terminated anyway. Because of this, the operating system associated with the HDD can not recognize the data recorded at the data region as a file because the FAT does not recognize it as such. This occurs even though a file is recorded at the data region of the HDD. Consequently, some portion of the data recorded that corresponds to the received broadcast signal can be lost.